<?php if($ktd_categories != NULL) : ?>
<?php foreach($ktd_categories as $ktd_category): ?>
    <div class="catbg vipnargorgialla">| <?php echo $ktd_category->getName() ?> |</div>
    <?php foreach($ktd_category->getForums() as $ktd_forum): ?>
        <div class="forumdescbg sonic-title-font">
            <h2 style="font-size: 1em"><?php echo strtolower(link_to(KillTheDragon::removeAccents($ktd_forum->getName()), 'show_forum', $ktd_forum))?></h2>
             <span class="last_message">
                <?php echo strtolower($ktd_forum->getLastMessage() != NULL ? link_to($ktd_forum->getLastMessage()->getKTDTopic()->getTitle(), 'show_topic', $ktd_forum->getLastMessage()->getKTDTopic()) : '') ?>
             </span>
        </div>
    <?php endforeach; ?>
<?php endforeach ?>
<?php endif ?>